<?php //pack11class

class ObjectsListItemHeaderPrice extends Module {

    public $special="";
    public $traceEnabled=true;

    protected $object;

	public function setup() {
        $this->object=$this->parent->getObject();
        $money=$this->object->getMoney();
        if(!$money) {
            $this->setPriceUndefined();
        } else {
            $this->setBody($money);
        }
 
        $special=new ObjectsListItemHeaderPriceSpecial;
        $spec=$this->object->special;
        if($spec) {
            $special->setBody($spec->string);
            $this->special=Template::html($special);
        }
     }

    private function setPriceUndefined() {
         $this->addStyle("font-size", "9px");
         $this->setBody(LabelManager::getLabel("price_undefined"));
    }

}
?>
